<?php
    header('Content-Type:text/html;charset=utf-8');

    $conn = new mysqli('localhost', 'root', 'root', 'youyou');

    if ($conn->connect_error) {
        die('数据库连接错误' . $conn->connect_error);
    }

    // echo '数据库连接成功';
?>